﻿using System;
using System.Xml.Serialization;
using Harvest.Api.Types;

namespace Harvest.Api.Model.Internal
{

  //<expense-category>
  //  <cache-version type="integer">2971150859</cache-version>
  //  <created-at type="datetime">2009-04-08T06:23:22Z</created-at>
  //  <deactivated type="boolean">false</deactivated>
  //  <id type="integer">185632</id>
  //  <name>Essen</name>
  //  <unit-name nil="true"></unit-name>
  //  <unit-price type="decimal" nil="true"></unit-price>
  //  <updated-at type="datetime">2009-04-09T08:03:19Z</updated-at>
  //</expense-category>

    /// <summary>
    /// 
    /// </summary>
    /// <remarks>
    /// Don't change the XmlElement attributes, otherwise (de)serialization will fail.
    /// </remarks>
    [XmlRoot(ElementName = "expense-category", IsNullable = false)]
    public class ExpenseCategoryItem
    {

        /// <summary>
        /// 
        /// </summary>
        [XmlElement(ElementName = "id", IsNullable = true)]
        public NullableInt Id { get; set; }

        /// <summary>
        /// 
        /// </summary>
        [XmlElement(ElementName = "name")]
        public string Name { get; set; }

        /// <summary>
        /// 
        /// </summary>
        [XmlElement(ElementName = "unit-name")]
        public string UnitName { get; set; }

        /// <summary>
        /// 
        /// </summary>
        [XmlElement(ElementName = "unit-price", IsNullable = true)]
        public NullableDouble UnitPrice { get; set; }

        /// <summary>
        /// 
        /// </summary>
        [XmlElement(ElementName = "deactivated", DataType = "boolean")]
        public bool Deactivated { get; set; }

    }

}
